package com.app.pojo;

import java.util.Date;

public class LoginState {
    private Date makeTime;
    private String userId;
    private int maxAge;

    public LoginState(Date makeTime, int maxAge, String userId) {
        this.makeTime = makeTime;
        this.maxAge = maxAge;
        this.userId = userId;
    }

    public Boolean isTimeOut(){
        return makeTime.getTime()+maxAge*1000<new Date().getTime();
    }

    public String getUserId() {
        return userId;
    }
}
